package com.ruoyi.house_sale.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import com.ruoyi.house_sale.mapper.SalestateMapper;
import com.ruoyi.house_sale.domain.Salestate;
import com.ruoyi.house_sale.service.ISalestateService;

import javax.annotation.Resource;

/**
 * 销售状态Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-30
 */
@Service
public class SalestateServiceImpl implements ISalestateService 
{
    @Resource
    private SalestateMapper salestateMapper;

    /**
     * 查询销售状态
     * 
     * @param saleid 销售状态主键
     * @return 销售状态
     */
    @Override
    public Salestate selectSalestateBySaleid(Long saleid)
    {
        return salestateMapper.selectSalestateBySaleid(saleid);
    }

    /**
     * 查询销售状态列表
     * 
     * @param salestate 销售状态
     * @return 销售状态
     */
    @Override
    public List<Salestate> selectSalestateList(Salestate salestate)
    {
        return salestateMapper.selectSalestateList(salestate);
    }

    /**
     * 新增销售状态
     * 
     * @param salestate 销售状态
     * @return 结果
     */
    @Override
    public int insertSalestate(Salestate salestate)
    {
        return salestateMapper.insertSalestate(salestate);
    }

    /**
     * 修改销售状态
     * 
     * @param salestate 销售状态
     * @return 结果
     */
    @Override
    public int updateSalestate(Salestate salestate)
    {
        return salestateMapper.updateSalestate(salestate);
    }

    /**
     * 批量删除销售状态
     * 
     * @param saleids 需要删除的销售状态主键
     * @return 结果
     */
    @Override
    public int deleteSalestateBySaleids(Long[] saleids)
    {
        return salestateMapper.deleteSalestateBySaleids(saleids);
    }

    /**
     * 删除销售状态信息
     * 
     * @param saleid 销售状态主键
     * @return 结果
     */
    @Override
    public int deleteSalestateBySaleid(Long saleid)
    {
        return salestateMapper.deleteSalestateBySaleid(saleid);
    }

    @Override
    public List<Salestate> findAllSaleState() {
        return salestateMapper.findAllSaleState();
    }
}
